package com.wanlian.netty.msg;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wanlian.json.JsonStringUtil;
import com.wanlian.netty.model.Address;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class PingMsg extends BaseMsg {
    private Address address;

    public PingMsg() {
        super();
        setType(MsgType.PING);
    }


    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
        this.setContent(JsonStringUtil.writeValueAsString(address));
    }
}